<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>会员关系图</title>

	
	
	
	 <!-- Bootstrap Core CSS -->
	<link href="__PUBLIC__/Theme2/css/bootstrap.min.css" rel='stylesheet' type='text/css' />
	<!-- Custom CSS -->
	<link href="__PUBLIC__/Theme2/css/style.css" rel='stylesheet' type='text/css' />
	<link href="__PUBLIC__/Theme2/css/font-awesome.css" rel="stylesheet"> 
	<!-- jQuery -->
	<script src="__PUBLIC__/Theme2/js/jquery.min.js"></script>

	<link href="__PUBLIC__/Theme2/css/custom.css" rel="stylesheet">
	<!-- Metis Menu Plugin JavaScript -->
	<script src="__PUBLIC__/Theme2/js/metisMenu.min.js"></script>
	<script src="__PUBLIC__/Theme2/js/custom.js"></script>
	<!-- Graph JavaScript -->
	<script src="__PUBLIC__/Theme2/js/d3.v3.js"></script>
	<script src="__PUBLIC__/Theme2/js/rickshaw.js"></script>
	<!-- Bootstrap Core JavaScript -->
	<script src="__PUBLIC__/Theme2/js/bootstrap.min.js"></script>

	
</head>

<body>

        <div class="col-md-12 graphs">
	   <div class="xs">
  	 <h3>会员关系图 </h3>
	 
	 
    <div class="panel panel-warning" data-widget="{&quot;draggable&quot;: &quot;false&quot;}" data-widget-static="">
				
				
				
				<style>
					.table-striped td{text-align:center;font-weight:bold;}
					
					.table td, .table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th{    padding: 15px 2px !important;}
					
				</style>
				<div class="panel-body no-padding" >
			
						<div colspan="3" style="text-align:left;line-height: 28px;color:red;">
							<?php
								if($teamCount){
									echo "<a href='__APP__/User/tiaozhengview/'> 你有 $teamCount 个小组等待你的调整 </a> ";
								}
								if($wei_fen_count)
								{
									echo "<br/>你有 $wei_fen_count 个小组等待拆分 ";
								}
							?> 
						</div>
						
						<a href="javascript:history.go(-1);">返回</a>
					<table class="table table-striped " cellpadding=0 cellspacing=0 >
						<tbody>
						
						
							<tr>
							<?php
								$i=0;
								foreach($ceng_lists as $c1=>$item){
								
								$str = "<tr>";
								$str .= "<td  colspan=3>{$item[name]}({$item[leveldesc]})</td>";
								$str .= "</tr>";
								echo $str;
									foreach($item['children'] as $cv=>$item1){
										echo "<td> <table width=100%>";
										
											echo "<tr><td colspan=3><a href='__APP__/user/guanxilists/search_loginname/{$item1[name]}'>{$item1[name]}({$item1[leveldesc]})</a></td></tr>";
										
										echo "<tr>";
										foreach($item1['children'] as $cv2=>$item2){
											echo "<td><table width=100%>";
											
											if($item2['level']>1)
												echo "<tr><td colspan=3><a href='__APP__/user/guanxilists/search_loginname/{$item2[name]}'>{$item2[name]}({$item2[leveldesc]})</a></td></tr>";
											else{
												echo "<tr><td><a href='__APP__/user/guanxilists/search_loginname/{$item2[name]}'>{$item2[name]}({$item2[leveldesc]})</a></td></tr>";
												
												if($item2[level]==1){
													if(3-$item2['childrencount']>0)
													{
														$i=0;
													
														for($i=$item2['childrencount'];$i<3;$i++)
														{
															echo "<tr><td>空</td></tr>";
														}
													}
												}
											}
											
											echo "<tr>";
											foreach($item2['children'] as $cv3=>$item3){
													if($item4[level]<>1)
														echo "<td><table width=100%><tr><td>{$item3[name]}({$item3[leveldesc]})</td></tr>";
													else{
														foreach($item3['children'] as $cv4=>$item4){
														//	echo $item4['childrencount'].'__';
															if($item4[level]<>1)
																echo "<tr><td>{$item4[name]}({$item4[leveldesc]})</td></tr>";
														}	
														
														if($item3[level]==1){
															if(3-$item3['childrencount']>0)
															{
																$i=0;
															
																for($i=$item3['childrencount'];$i<3;$i++)
																{
																	echo "<tr><td>空</td></tr>";
																}
															}	
														}
													}												
																
												echo 		"</table>
														</td>";
											}
											echo "</tr>";
											
											echo "</table></td>";
										}
										
										echo "</tr>";
										
										echo "</table></td>";
										
										
										
										
									}
								}
							?>
							</tr>
						
							
							
							
						</tbody>
					</table>
					
					
					<div class="result page"><{$page}></div>
				</div>
	</div>
	
   
	
  </div>
  <div class="copy_layout">
      <p>
	  </p>
  </div>
   </div>
   
    
</body>

</html>
